<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="AloveZ">
    <link rel="icon" href="../../favicon.ico">

    <title>我的点单</title>

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/statics/css/common.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/menu">点单</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <!--<ul class="nav navbar-nav">-->
                <!--<li class="active">-->
                    <!--<a href="#">点餐</a>-->
                <!--</li>-->
            <!--</ul>-->
          {% if is_login %}
          <ul class="nav navbar-nav navbar-right">
          <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">欢迎您，{{ username }}<span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="/cart">我的点单</a></li>
                  <li role="separator" class="divider"></li>
                  <li><a href="/logout">登出</a></li>
                </ul>
              </li>
             </ul>
          {% endif %}
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">
        <table class="table">
  <caption>我的点单</caption>
  <thead>
    <tr>
      <th>已点菜品</th>
    </tr>
  </thead>
  <tbody>
  {% for dish in dishes %}
    <tr>
      <td>{{ dish.0 }}</td>
      <td><a class="btn btn-primary" href="/cart?dish={{ dish.0 }}&shop={{ dish.1 }}">删除</a></td>
    </tr>
  {% endfor %}
  </tbody>
</table>
    </div><!-- /.container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  </body>
</html>
